Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Diagnostics for Bulk Stream #770

Merged
merged 64 commits into from
Sep 12, 2019
Merged

Conversation

ealsur
Copy link
Member

@ealsur ealsur commented Sep 5, 2019

Pull Request Template

Description

This PR wires Diagnostics from the ResponseMessage to the BatchResponse (enabling Diagnostics for Batch API) and subsequently, to the ItemOperationContext that will hold them until the operation Completes.

In the case of retries, multiple Diagnostics for each operation will exist, hence the introduction of ItemBatchOperationStatistics, which will hold all single Diagnostics and wire them to the final operation Diagnostics when sent to the caller.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Closes #691, related to #584

@ealsur ealsur added feature-request New feature or request Batch Batch related issue labels Sep 5, 2019
@ealsur ealsur self-assigned this Sep 5, 2019
abhijitpai
abhijitpai previously approved these changes Sep 8, 2019
@j82w
Copy link
Contributor

j82w commented Sep 12, 2019

    public void Fail(

Should the diagnostics be set on failure?


Refers to: Microsoft.Azure.Cosmos/src/Batch/ItemBatchOperationContext.cs:69 in d8fca9e. [](commit_id = d8fca9e, deletion_comment = False)

@ealsur
Copy link
Member Author

ealsur commented Sep 12, 2019

Fail is for an unhandled exception scenario, not for a failed Response scenario. Failed Responses (like a 429, or a 400) are successful in the sense that we were able to complete the operation with a result, and thus sent through Complete.

Fail only gets an Exception and there is no context to obtain diagnostics from.

@kirankumarkolli kirankumarkolli merged commit 1f40f52 into master Sep 12, 2019
@kirankumarkolli kirankumarkolli deleted the users/ealsur/bulkstreamdiagnostics branch September 12, 2019 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Batch Batch related issue feature-request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bulk Stream > Diagnostics
4 participants